package model

import "time"

// SysRole对象
type SysRole struct {
	// global.BASE_MODEL
	CreatedAt time.Time
	UpdatedAt time.Time
	DeletedAt *time.Time `sql:"index"`
	RoleId    string     `json:"roleId" gorm:"not null;unique;primary_key;comment:角色ID;size:90"` //角色ID
	RoleName  string     `json:"RoleName" gorm:"comment:角色名"`                                    //角色名
	ParentId  string     `json:"parentId" gorm:"父角色ID"`                                          //父角色ID

	Children []SysRole `json:"children" gorm:"-"`
	SysMenus []SysMenu `json:"menus" gorm:"many2many:sys_role_menus"`
}
